<script setup lang="ts">
import { useToast } from 'wot-design-uni'

const title = ref('Hello')

const toast = useToast()

function onClickMe() {
  toast.success('Hello World')
  const dateStr = useDateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss')
  toast.warning(dateStr.value)
}
</script>

<template>
  <view class="content">
    <image class="logo" src="/static/logo.png" />
    <view class="text-area">
      <text class="title">
        {{ title }}
      </text>
    </view>
    <view class="mx-auto flex justify-center items-center border rounded bg-cyan-300 w-full h-56">
      <wd-button type="primary" @click="onClickMe">
        Click Me
      </wd-button>
    </view>
  </view>
</template>

<style lang="scss">
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin: 200rpx auto 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>

<route lang="json">
{
"layout": "default",
"name": "Home",
"style": {
"navigationBarTitleText": "Home"
}
}
</route>
